<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserHealth2Table extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_health_2', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('用户ID');
            $table->tinyInteger('history_chd')->default('0')->nullable()->comment('冠心病');
            $table->tinyInteger('history_ap')->default('0')->nullable()->comment('心绞痛');
            $table->tinyInteger('history_htn')->default('0')->nullable()->comment('高血压');
            $table->tinyInteger('history_dm')->default('0')->nullable()->comment('糖尿病');
            $table->tinyInteger('history_bih')->default('0')->nullable()->comment('脑梗');
            $table->tinyInteger('history_sss')->default('0')->nullable()->comment('中风后遗症');
            $table->tinyInteger('history_cso')->default('0')->nullable()->comment('颈椎病');
            $table->tinyInteger('history_lrp')->default('0')->nullable()->comment('腰腿病');
            $table->tinyInteger('history_gout')->default('0')->nullable()->comment('痛风');
            $table->tinyInteger('history_ra')->default('0')->nullable()->comment('风湿关节炎');
            $table->tinyInteger('history_cg')->default('0')->nullable()->comment('慢性胃炎');
            $table->tinyInteger('history_other')->default('0')->nullable()->comment('其他');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_health_2');
    }
}
